﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace HotelManager.DataAccess.Model
{
    public class SearchModel
    {
        [Display(Name = "Country")]
        [Required(ErrorMessage = "Select a country!")]
        public int CountryId { get; set; }

        [Display(Name = "City")]
        [Required(ErrorMessage = "Select a city!")]
        public int CityId { get; set; }

        [Display(Name = "Check-in date")]
        [Required(ErrorMessage = "Check-in date required!")]
        [Remote("ValidateCheckinTime", "Home")]
        public DateTime? CheckInTime { get; set; }

        [Display(Name = "Check-out date")]
        [Required(ErrorMessage = "Check-out date required!")]
        [Remote("ValidateCheckoutTime", "Home", AdditionalFields = "CheckInTime")]
        public DateTime? CheckOutTime { get; set; }
    }
}
